{include file="mobile_header" title="首页" /}
<body ontouchstart>
<header class="ui-header ui-header-positive ui-border-b">
	<h1>首页</h1>
</header>
<section class="ui-selector">
	<header class="ui-border-b">
		<h3>首页</h3>
	</header>
	<div id="">
		<ul class="ui-list ui-border-tb ui-list-text ui-list-link">
			<li class="ui-border-t" id="userInfo">
				<div class="ui-avatar-lg">
					<span style="background-image:url(/static/admin/images/profile_small.jpg)"></span>
				</div>
				<div class="ui-list-info">
					<h4 class="ui-nowrap">{$Think.session.admin_name}</h4>
					<p class="ui-nowrap">{$Think.session.role_name}</p>
				</div>
			</li>
	</div>
	<div class="ui-selector-content" >
		<ul>
			{if !empty($menu)}
			{foreach name="menu" item="vo"}
			<li class="ui-selector-item nav-li">
				<h3 class="ui-border-b nav">
					<p>{$vo.node_name}</p>
				</h3>
				<ul class="ui-list ui-border-b child-nav">
					{if !empty($vo['child'])}
					{foreach name="$vo['child']" item="v"}
					<li>
						<div class="ui-avatar-s" style="width:0.3rem;height:0.2rem;margin-left:0.2rem;border-radius:0px;background-image: url()">
							<!--<span style="background-image:url(../img/ava1.png)"></span>-->
						</div>
						<a class="ui-list-info ui-border-t" href="{$v.href}" style="display: block;"><h4>{$v.node_name}</h4></a>
					</li>
					{/foreach}
					{/if}
				</ul>
			</li>
		</ul>
		</li>
		{/foreach}
		{/if}
		</ul>
	</div>
</section>
{include file="mobile_footer" /}
<div class="ui-actionsheet">
	<div class="ui-actionsheet-cnt">
		<h4>安全退出登录</h4>
		<button id="loginOut" class="ui-actionsheet-del">退出</button>
		<button id="loginCancel">取消</button>
	</div>
</div>
<style type="text/css">
</style>
<script type="text/javascript">
    $('#userInfo').on('click', function(){
        $('.ui-actionsheet').addClass('show');
    })
    $('#loginCancel').on('click', function(){
        $('.ui-actionsheet').removeClass('show');
    })
    $('#loginOut').on('click', function(){
        window.location.href = "{:url('admin/login/loginOut')}";
    })

    //菜单伸缩
    $('document').ready(function(){
        $('.nav').on('click',function(){
            var that = $(this);
            var navLi = that.parent();
            if (navLi.hasClass('active')) {
                navLi.removeClass('active');
            }else{
                navLi.addClass('active');
            }
        })
    })


</script>
</body>
</html>